import requests
from config import *


class CourseAPI:
    # 新增课程
    def add_course(self, token, add_course_data):
        """新增课程"""
        return requests.post(f"{base_url}/api/clues/course", headers={"Authorization": token}, json=add_course_data)

    # 查询课程列表
    def query_course_list(self, token, params):
        """查询课程列表"""
        return requests.get(f"{base_url}/api/clues/course/list", headers={"Authorization": token}, params=params)
